#pragma once

#include <QProxyStyle>

// 改变 默认的部件风格
class CustomProxyStyle : public QProxyStyle
{
public:
	CustomProxyStyle(QObject* parent)
		//QProxyStyle(parent)
	{
		setParent(parent);
	}

	virtual void drawPrimitive(PrimitiveElement element, const QStyleOption* option,
		QPainter* painter, const QWidget* widget = nullptr)const
	{
		if (QStyle::PrimitiveElement::PE_FrameFocusRect == element)
		{
			// 去掉Windows中部件默认的边框, 或 虚线框
			// 部件获取焦点时, 直接返回
			return;
		}
		else
		{
			QProxyStyle::drawPrimitive(element, option, painter, widget);
		}
	}

public:

};